package zdar.processing;

import zdar.entities.Unit;
import zdar.entities.UnitTemplate;

import com.badlogic.gdx.scenes.scene2d.ui.Label;
import com.badlogic.gdx.scenes.scene2d.ui.Skin;

/**
 * This is going to hold all the labels for the Stats screen since it will be pain to track 20something separate labels in a Screen Class
 * @author elliot
 *
 */
public class CharSheetDisplay {

	// TODO: testing: treat everything as a UnitTemplate, hopefully it will call the Unit specific things instead... we'll see
	UnitTemplate charSheet;
	
	private Label name, description;
	private Label wounds, fatigue, powerpoints;
	private Label agility, smarts, spirit, strength, vigor;
	
	public CharSheetDisplay(Skin skin){		
		name = new Label("nameless", skin);
		description = new Label("descriptionless", skin);
		wounds = new Label("0/0", skin);
		fatigue = new Label("0/0", skin);
	}
	
	public void update(){
		name.setText(charSheet.getDisplayName());
		description.setText(charSheet.getDescription());
		wounds.setText(charSheet.getWounds() + "/" + charSheet.getMaxWounds());
		fatigue.setText(charSheet.getFatigue() + "/" + charSheet.getMaxFatigue());
	}
	
	public void changeUnitType (UnitTemplate enemyChar){
		this.charSheet = enemyChar;
		update();
	}
	
	
	
	public UnitTemplate getCharSheet() {
		return charSheet;
	}
	public Label getName() {
		return name;
	}
	public Label getDescription() {
		return description;
	}
	public Label getWounds() {
		return wounds;
	}
	public Label getFatigue() {
		return fatigue;
	}
	public Label getPowerpoints() {
		return powerpoints;
	}
	public Label getAgility() {
		return agility;
	}
	public Label getSmarts() {
		return smarts;
	}
	public Label getSpirit() {
		return spirit;
	}
	public Label getStrength() {
		return strength;
	}
	public Label getVigor() {
		return vigor;
	}
	
	// I think the best way to handle this is to pass in the Character Sheet (currently UnitTemplate) and sort out all the values that way
	// Since everything is private it should just force everyone to use the update method
	
	
	
}
